<!DOCTYPE html>
<html lang=zh>
<head>
    <meta charset="utf-8">
    
    <title>程序猿</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta property="og:type" content="website">
<meta property="og:title" content="程序猿">
<meta property="og:url" content="http://yoursite.com/page/3/index.html">
<meta property="og:site_name" content="程序猿">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="程序猿">
    

    
        <link rel="alternate" href="/" title="程序猿" type="application/atom+xml" />
    

    

    <link rel="stylesheet" href="/libs/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/libs/open-sans/styles.css">
    <link rel="stylesheet" href="/libs/source-code-pro/styles.css">

    <link rel="stylesheet" href="/css/style.css">

    <script src="/libs/jquery/2.1.3/jquery.min.js"></script>
    
    
        <link rel="stylesheet" href="/libs/lightgallery/css/lightgallery.min.css">
    
    
        <link rel="stylesheet" href="/libs/justified-gallery/justifiedGallery.min.css">
    
    
    
    


</head>

<body>
    <div id="container">
        <header id="header">
    <div id="header-main" class="header-inner">
        <div class="outer">
            <a href="/" id="logo">
                <i class="logo"></i>
                <span class="site-title">程序猿</span>
            </a>
            <nav id="main-nav">
                
                    <a class="main-nav-link" href="http://chinesszz.oschina.io/">主页</a>
                
                    <a class="main-nav-link" href="/archives">档案</a>
                
                    <a class="main-nav-link" href="/archives">分类</a>
                
                    <a class="main-nav-link" href="/archives">标签</a>
                
                    <a class="main-nav-link" href="/关于我">关于我</a>
                
            </nav>
            
                
                <nav id="sub-nav">
                    <div class="profile" id="profile-nav">
                        <a id="profile-anchor" href="javascript:;">
                            <img class="avatar" src="/css/images/avatar.png" />
                            <i class="fa fa-caret-down"></i>
                        </a>
                    </div>
                </nav>
            
            <div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="搜索" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="想要查找什么..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '文章',
            PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
            UNTITLED: '(未命名)',
        },
        ROOT_URL: '/',
        CONTENT_URL: '/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
<script src="/js/insight.js"></script>

</div>
        </div>
    </div>
    <div id="main-nav-mobile" class="header-sub header-inner">
        <table class="menu outer">
            <tr>
                
                    <td><a class="main-nav-link" href="http://chinesszz.oschina.io/">主页</a></td>
                
                    <td><a class="main-nav-link" href="/archives">档案</a></td>
                
                    <td><a class="main-nav-link" href="/archives">分类</a></td>
                
                    <td><a class="main-nav-link" href="/archives">标签</a></td>
                
                    <td><a class="main-nav-link" href="/关于我">关于我</a></td>
                
                <td>
                    
    <div class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="搜索" />
    </div>

                </td>
            </tr>
        </table>
    </div>
</header>

        <div class="outer">
            
                

<aside id="profile">
    <div class="inner profile-inner">
        <div class="base-info profile-block">
            <img id="avatar" src="/css/images/avatar.png" />
            <h2 id="name">刘鑫</h2>
            <h3 id="title">一个热爱生活喜欢技术的程序猿</h3>
            <span id="location"><i class="fa fa-map-marker"></i>shanghai, China</span>
            <a id="follow" target="_blank" href="https://github.com/lxchinesszz">关注我</a>
        </div>
        <div class="article-info profile-block">
            <div class="article-info-block">
                25
                <span>文章</span>
            </div>
            <div class="article-info-block">
                19
                <span>标签</span>
            </div>
        </div>
        
        <div class="profile-block social-links">
            <table>
                <tr>
                    
                    
                    <td>
                        <a href="https://github.com/lxchinesszz" target="_blank" title="github" class=tooltip>
                            <i class="fa fa-github"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/" target="_blank" title="twitter" class=tooltip>
                            <i class="fa fa-twitter"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/" target="_blank" title="facebook" class=tooltip>
                            <i class="fa fa-facebook"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/" target="_blank" title="dribbble" class=tooltip>
                            <i class="fa fa-dribbble"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="http://weibo.com/u/5513970927?is_all=1" target="_blank" title="weibo" class=tooltip>
                            <i class="fa fa-weibo"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/" target="_blank" title="rss" class=tooltip>
                            <i class="fa fa-rss"></i>
                        </a>
                    </td>
                    
                </tr>
            </table>
        </div>
        
    </div>
</aside>

            
            <section id="main">
    <article id="Layout-SpringBoot在启动类配置端口号" class="article article-type-Layout" itemscope itemprop="blogPost">
    <div class="article-inner">
        
        
            <header class="article-header">
                
    
        <h1 itemprop="name">
            <a class="article-title" href="/2016/05/01/SpringBoot在启动类配置端口号/">SpringBoot在启动类配置端口号代码片段</a>
        </h1>
    

                
                    <div class="article-meta">
                        
    <div class="article-date">
        <i class="fa fa-calendar"></i>
        <a href="/2016/05/01/SpringBoot在启动类配置端口号/">
            <time datetime="2016-04-30T16:00:00.000Z" itemprop="datePublished">2016-05-01</time>
        </a>
    </div>


                        
    <div class="article-category">
    	<i class="fa fa-folder"></i>
        <a class="article-category-link" href="/categories/Spring-Boot实战/">Spring Boot实战</a>
    </div>

                        
    <div class="article-tag">
        <i class="fa fa-tag"></i>
        <a class="tag-link" href="/tags/SpringBoot在启动类配置端口号/">SpringBoot在启动类配置端口号</a>
    </div>

                    </div>
                
            </header>
        
        
        <div class="article-entry" itemprop="articleBody">
        
            
            <figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line">@SpringBootApplication</div><div class="line">public class DragonflyApplication extends SpringBootServletInitializer implements EmbeddedServletContainerCustomizer &#123;</div><div class="line">    public static void main(String[] args) &#123;</div><div class="line">        SpringApplication.run(DragonflyApplication.class, args);</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    @Override</div><div class="line">    public void customize(ConfigurableEmbeddedServletContainer configurableEmbeddedServletContainer) &#123;</div><div class="line">        configurableEmbeddedServletContainer.setPort(10087);</div><div class="line">    &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
        
        </div>
        <footer class="article-footer">
            <div class="share-container">



</div>

    <a data-url="http://yoursite.com/2016/05/01/SpringBoot在启动类配置端口号/" data-id="cizk115e20016jj8z8ynhyi0e" class="article-share-link"><i class="fa fa-share"></i>分享到</a>
<script>
    (function ($) {
        // Prevent duplicate binding
        if (typeof(__SHARE_BUTTON_BINDED__) === 'undefined' || !__SHARE_BUTTON_BINDED__) {
            __SHARE_BUTTON_BINDED__ = true;
        } else {
            return;
        }
        $('body').on('click', function() {
            $('.article-share-box.on').removeClass('on');
        }).on('click', '.article-share-link', function(e) {
            e.stopPropagation();

            var $this = $(this),
                url = $this.attr('data-url'),
                encodedUrl = encodeURIComponent(url),
                id = 'article-share-box-' + $this.attr('data-id'),
                offset = $this.offset(),
                box;

            if ($('#' + id).length) {
                box = $('#' + id);

                if (box.hasClass('on')){
                    box.removeClass('on');
                    return;
                }
            } else {
                var html = [
                    '<div id="' + id + '" class="article-share-box">',
                        '<input class="article-share-input" value="' + url + '">',
                        '<div class="article-share-links">',
                            '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="fa fa-twitter article-share-twitter" target="_blank" title="Twitter"></a>',
                            '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="fa fa-facebook article-share-facebook" target="_blank" title="Facebook"></a>',
                            '<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="fa fa-pinterest article-share-pinterest" target="_blank" title="Pinterest"></a>',
                            '<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="fa fa-google article-share-google" target="_blank" title="Google+"></a>',
                        '</div>',
                    '</div>'
                ].join('');

              box = $(html);

              $('body').append(box);
            }

            $('.article-share-box.on').hide();

            box.css({
                top: offset.top + 25,
                left: offset.left
            }).addClass('on');

        }).on('click', '.article-share-box', function (e) {
            e.stopPropagation();
        }).on('click', '.article-share-box-input', function () {
            $(this).select();
        }).on('click', '.article-share-box-link', function (e) {
            e.preventDefault();
            e.stopPropagation();

            window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
        });
    })(jQuery);
</script>

            
    
        <a href="http://yoursite.com/2016/05/01/SpringBoot在启动类配置端口号/#comments" class="article-comment-link ds-thread-count" data-thread-key="http://yoursite.com/2016/05/01/SpringBoot在启动类配置端口号/">评论</a>
    

        </footer>
    </div>
    
</article>



    <article id="Layout-本地服务器搭建 二之 （服务器使用密钥安全连接" class="article article-type-Layout" itemscope itemprop="blogPost">
    <div class="article-inner">
        
        
            <header class="article-header">
                
    
        <h1 itemprop="name">
            <a class="article-title" href="/2016/01/28/本地服务器搭建 二之 （服务器使用密钥安全连接/">本地服务器搭建 二之 （服务器使用密钥安全连接）</a>
        </h1>
    

                
                    <div class="article-meta">
                        
    <div class="article-date">
        <i class="fa fa-calendar"></i>
        <a href="/2016/01/28/本地服务器搭建 二之 （服务器使用密钥安全连接/">
            <time datetime="2016-01-27T16:00:00.000Z" itemprop="datePublished">2016-01-28</time>
        </a>
    </div>


                        
    <div class="article-category">
    	<i class="fa fa-folder"></i>
        <a class="article-category-link" href="/categories/服务器搭建/">服务器搭建</a>
    </div>

                        
    <div class="article-tag">
        <i class="fa fa-tag"></i>
        <a class="tag-link" href="/tags/服务器搭建/">服务器搭建</a>
    </div>

                    </div>
                
            </header>
        
        
        <div class="article-entry" itemprop="articleBody">
        
            
            <p>作者：<a href="https://lxchinesszz.github.io/" target="_blank" rel="external">@lxchinesszz</a><br>本文为作者原创，转载请注明出处</p>
<blockquote>
<p>紧接上文，上文的重点不是连接，而是如何在局域网中用废弃的电脑搭建，是不是感觉很easy，那么这篇文章我们的重点就放在了安全上了，因为毕竟服务器是我们放应用或者数据库的地方，安全性一定要可靠。小编是做Java开发的，一只热爱技术的小菜鸟，因为工作中常常要一条龙服务，即，自己写需求文档，自己码代码，自己测试，自己部署，自己维护。虽然很累，但是很充实，很能提高自己。我也希望把自己的工作经验分享出来，对那些想小编一样热爱技术的小伙，有所帮助。说半天废话，下面开始。</p>
</blockquote>
<ul>
<li>密钥登录原理：<ul>
<li>密钥常是一对的，即公钥和私钥，将公钥添加到服务器上的某个账户，然后客户端连接的时候，使用私钥完成认证就可以登录</li>
</ul>
</li>
</ul>
<h1 id="A-使用私钥登录"><a href="#A-使用私钥登录" class="headerlink" title="A.使用私钥登录"></a>A.使用私钥登录</h1><h2 id="1-制作密钥对"><a href="#1-制作密钥对" class="headerlink" title="1.制作密钥对"></a>1.制作密钥对</h2><ul>
<li>首先在服务器制作，需要的登录账户，然后执行以下命令</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line">[root@host ~]$ ssh-keygen   #建立密钥对</div><div class="line">Generating public/private rsa key pair.</div><div class="line">Enter file in which to save the key (/root/.ssh/id_rsa): #按 Enter</div><div class="line">Created directory &apos;/root/.ssh&apos;.</div><div class="line">Enter passphrase (empty for no passphrase):  # 输入密钥锁码，或直接按 Enter 留空</div><div class="line">Enter same passphrase again: # 再输入一遍密钥锁码</div><div class="line">Your identification has been saved in /root/.ssh/id_rsa. # 私钥</div><div class="line">Your public key has been saved in /root/.ssh/id_rsa.pub. # 公钥</div><div class="line">The key fingerprint is:</div><div class="line">0f:d3:e7:1a:1c:bd:5c:03:f1:19:f1:22:df:9b:cc:08 root@host</div></pre></td></tr></table></figure>
<h2 id="2-安装公钥到服务端"><a href="#2-安装公钥到服务端" class="headerlink" title="2.安装公钥到服务端"></a>2.安装公钥到服务端</h2><ul>
<li>讲公钥安装到服务器</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">[root@host ~]$ cd .ssh</div><div class="line">[root@host .ssh]$ cat id_rsa.pub &gt;&gt; authorized_keys</div></pre></td></tr></table></figure>
<ul>
<li>设置权限</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">[root@host .ssh]$ chmod 600 authorized_keys  #不让其他用户写入 600 权限</div><div class="line">[root@host .ssh]$ chmod 700 ~/.ssh           #读写执行的权限 700</div></pre></td></tr></table></figure>
<ul>
<li><p>ssh的配置文件都在<code>/etc/ssh/</code> 里面</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">[centos@localhost ~]$ cd /etc/ssh/</div><div class="line">[centos@localhost ssh]$ ls</div><div class="line"> ssh_config #是客户单配置的</div><div class="line"> sshd_config #是服务端配置的</div></pre></td></tr></table></figure>
</li>
<li><p>在<code>sshd_config</code>中配置使用RSA登录</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">RSAAuthentication yes</div><div class="line">PubkeyAuthentication yes</div><div class="line">PermitRootLogin yes # 允许root用户通过ssh登录</div><div class="line">PasswordAuthentication no #不允许密码登录，只用使用私钥登录[一般我也用yes]</div></pre></td></tr></table></figure>
</li>
<li><p>最后服务端重启 ssh</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">[root@host .ssh]$ service sshd restart</div></pre></td></tr></table></figure>
</li>
</ul>
<h2 id="3-操作客户端"><a href="#3-操作客户端" class="headerlink" title="3.操作客户端"></a>3.操作客户端</h2><ul>
<li>3.1把服务端私钥复制到客户端，cat id_rsa，就是一下内容</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div></pre></td><td class="code"><pre><div class="line">-----BEGIN RSA PRIVATE KEY-----</div><div class="line">Proc-Type: 4,ENCRYPTED</div><div class="line">DEK-Info: DES-EDE3-CBC,A757691CABE05419</div><div class="line"></div><div class="line">yvEX5nQY3+OeZ56kTt8i41YChrQgL9OwglA3SIU2ymrWvY+5IxXMOQbjJmoSFtRz</div><div class="line">Or0lB1eWZx8ZimGdG+y9KoN4AkUzX+HqzaC8/eMczrv2KXP6DpOvV6MTdHoBrTb8</div><div class="line">pJOSVzw1K1jmGPaCdWg3XJ7iNSdYr+FVHC6gmJhCCvSHjXLHYBseTSJNXzs4DpQr</div><div class="line">rTAnU1NXVt0ce3R7DCO/hGClS5zeQ7j7fpQ48cwBgNJumCcr5eU/TWlUMKm7Q8Za</div><div class="line">zLaugTg387qKaieFY6v8CvpqT4Oqt+j1+6B05sr2S4XiiWHdlcieG4fgSRc5I7kp</div><div class="line">EhzZWM2LdK6NtxkbWVzd0ZOu5dZDIaMykC2KJJwT+NW3yKZvN1iebm7jzLC3Pv1B</div><div class="line">dAqnzxMuwBVNbkvrmVWzi8+OvSfH3ttCoRVnshAAvPylBazAZpWn5k6f0QC8MkUQ</div><div class="line">AIEFex80xBPJTT+L6HuijrO2Z1K6qeWe+ptUAqX3FrcuneH1Nn3MnOhNVb4HZvk0</div><div class="line">xoy3/+2xe3sYKOUsMqjpWlI3DzGnZ81R8z1sTquRQy3hHDZ8cA6k1wUWoVTpJArb</div><div class="line">CLphYurek+YN3kFGLhvKnd6YjnH3d2sq/qSIMp4m3T8iBkex5raf4iNpFwKzb3S9</div><div class="line">D6QSWl9Nfnd2tAWkApXU4TPOcbX7XtX1P5yexyNxAZaUHuDsPStO/53WHfu8G2BP</div><div class="line">nM2Pefaj1sUcODLK+4JR+edmtA9rjHXVx7Kd3OKRmpocmzYWgEOQJtklr+cL7SJJ</div><div class="line">HzoKBjx0NB5/iW23KxSnj7gJhnrDbcD9wY5g63DuMsNnreMfk6trTbXe5ck/mfYN</div><div class="line">6bTCXkVczm5Q8BKY0cJF2n/2dJyow9RFJtxDTzm11SvqdXtZoanC5mttePViu3J8</div><div class="line">8dbNETFw0DwutyY3KPq3taX40Ps76Ahh6BTb5QD8ctxpYx63MOfQG/BrPFD9M6Al</div><div class="line">l5YLzi1In3hc0s6GN2yvx/fdjNZpYFgxA0GH66evtlo3HMr/Id8zgZ+ZSikHMXpv</div><div class="line">piXS4uBIgeCZeRaTbq/Bd2V2sN3ENQgV7UTVrnHDc5IWH+qpg8AZxnvmP6BBATNQ</div><div class="line">2WAc6I10JqkrtfwjKuSYGyJmg6fY5uSKkZo9JQ1uviWEyhdKDhtYgStxyoIznrbJ</div><div class="line">E7PQ3iE3VanB0zmhJHdFJ9xsy5yggMSnRfLCmLsXrczJX0ALwtCDGrrAR3wAg1fn</div><div class="line">7WmdUfyfnAugJGOBMx25vOLASL3q5zKoxEr7ayln51uuWRE2oK63low68lcWt42a</div><div class="line">S/ozMsev6Wg7QQjg7HRYEavYZGmCv9OBAblOmneUQjajT2F6zY1R4Cajkk3XmBO2</div><div class="line">GHXJ685hTiBMQsGf81NMtGd2Zkd5jbcHYhfOe1TKRhgp9cxtzKuyzD2Hj5Bltw8P</div><div class="line">q26JVqhLAXZpy73kVsCpU8KplyvZM349kM+VwzOwvvuoWuS+pi9iYYv2f4CjDWZ4</div><div class="line">dfzg30+ekEc2QTwsZrYbG8SyIOn4oZSE+ygFNge/o2ftqwpRSwJhV8sUlrhBHQb/</div><div class="line">plePpQQfRQlnifiqR/z2JQ4y28purVt5GKPuwsK4SpHCQTpXW3OkdA==</div><div class="line">-----END RSA PRIVATE KEY-----</div></pre></td></tr></table></figure>
<ul>
<li>把里面的内容复制（这个是我的）自己的文件下</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">1.你也可以把服务端的id_rsa 下载到你的客户端，放在当前用户的.ssh目录下</div><div class="line">2.也可以复制里面的内容然后再.ssh目录下，重新创建一个id_rsa</div><div class="line"></div><div class="line">vi ~/.ssh/id_rsa # 创建私钥</div></pre></td></tr></table></figure>
<h2 id="4-直接可以登录了【然后就会发现问题】"><a href="#4-直接可以登录了【然后就会发现问题】" class="headerlink" title="4.直接可以登录了【然后就会发现问题】"></a>4.直接可以登录了【然后就会发现问题】</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div></pre></td><td class="code"><pre><div class="line">✘ ⚙ mac@MacBook-Air  ~/.ssh  ssh centos@192.168.1.112</div><div class="line">@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</div><div class="line">@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @</div><div class="line">@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</div><div class="line">Permissions 0644 for &apos;/Users/mac/.ssh/id_rsa&apos; are too open.</div><div class="line">It is required that your private key files are NOT accessible by others.</div><div class="line">This private key will be ignored.</div><div class="line">Load key &quot;/Users/mac/.ssh/id_rsa&quot;: bad permissions</div><div class="line">centos@192.168.1.112&apos;s password:</div><div class="line"></div><div class="line"># 遇到这个问题一般就是权限问题 赋权700 ，然后就ok了</div><div class="line">⚙ mac@MacBook-Air  ~/.ssh  chmod 700 id_rsa</div><div class="line">⚙ mac@MacBook-Air  ~/.ssh  ssh centos@192.168.1.112</div><div class="line">Enter passphrase for key &apos;/Users/mac/.ssh/id_rsa&apos;:</div><div class="line">Last login: Sun Feb 19 12:56:05 2017 from 192.168.1.113</div></pre></td></tr></table></figure>
<h1 id="B-设置安全端口"><a href="#B-设置安全端口" class="headerlink" title="B.设置安全端口"></a>B.设置安全端口</h1><ul>
<li>默认使用22端口，这个在<code>etc/ssh/ssh_config</code> 就可以看到</li>
</ul>
<p>我们可以不使用22端口，此时我们可以在服务器重新创建一个端口，然后使用防火墙屏蔽其他端口</p>
<ul>
<li><p>开启端口</p>
<ul>
<li><p><strong>开启一个10222端口</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT   #写入修改</div><div class="line"> </div><div class="line">/etc/init.d/iptables save   #保存修改</div><div class="line"> </div><div class="line">service iptables restart    #重启防火墙，修改生效</div></pre></td></tr></table></figure>
<p>​</p>
</li>
</ul>
</li>
<li><p>然后可以查看一下端口状态</p>
<ul>
<li>查看的时候一定要用root用户，否则查看不到的，所以我切换了10222 端口连接</li>
<li>端口的知识属于计算机的基础知识，如果你能看到这里，说明你的基础已经够了，不过下面我会专门写一篇关于底层的计算机的文章。</li>
</ul>
</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div></pre></td><td class="code"><pre><div class="line">[centos@localhost ssh]$ su root</div><div class="line">密码：</div><div class="line">[root@localhost ssh]# /etc/init.d/iptables status</div><div class="line">表格：filter</div><div class="line">Chain INPUT (policy ACCEPT)</div><div class="line">num  target     prot opt source               destination</div><div class="line">1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:10222</div><div class="line">2    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:10222</div><div class="line">3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED</div><div class="line">4    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0</div><div class="line">5    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0</div><div class="line">6    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22</div><div class="line">7    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited</div><div class="line"></div><div class="line">Chain FORWARD (policy ACCEPT)</div><div class="line">num  target     prot opt source               destination</div><div class="line">1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited</div><div class="line"></div><div class="line">Chain OUTPUT (policy ACCEPT)</div><div class="line">num  target     prot opt source               destination</div></pre></td></tr></table></figure>
<ul>
<li>服务端在/etc/ssh/sshd_config 中监听10222端口，然后就可以使用</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">ssh -p 10222 centos@192.168.1.112</div></pre></td></tr></table></figure>

        
        </div>
        <footer class="article-footer">
            <div class="share-container">



</div>

    <a data-url="http://yoursite.com/2016/01/28/本地服务器搭建 二之 （服务器使用密钥安全连接/" data-id="cizk115fs001ojj8zqya510rh" class="article-share-link"><i class="fa fa-share"></i>分享到</a>
<script>
    (function ($) {
        // Prevent duplicate binding
        if (typeof(__SHARE_BUTTON_BINDED__) === 'undefined' || !__SHARE_BUTTON_BINDED__) {
            __SHARE_BUTTON_BINDED__ = true;
        } else {
            return;
        }
        $('body').on('click', function() {
            $('.article-share-box.on').removeClass('on');
        }).on('click', '.article-share-link', function(e) {
            e.stopPropagation();

            var $this = $(this),
                url = $this.attr('data-url'),
                encodedUrl = encodeURIComponent(url),
                id = 'article-share-box-' + $this.attr('data-id'),
                offset = $this.offset(),
                box;

            if ($('#' + id).length) {
                box = $('#' + id);

                if (box.hasClass('on')){
                    box.removeClass('on');
                    return;
                }
            } else {
                var html = [
                    '<div id="' + id + '" class="article-share-box">',
                        '<input class="article-share-input" value="' + url + '">',
                        '<div class="article-share-links">',
                            '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="fa fa-twitter article-share-twitter" target="_blank" title="Twitter"></a>',
                            '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="fa fa-facebook article-share-facebook" target="_blank" title="Facebook"></a>',
                            '<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="fa fa-pinterest article-share-pinterest" target="_blank" title="Pinterest"></a>',
                            '<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="fa fa-google article-share-google" target="_blank" title="Google+"></a>',
                        '</div>',
                    '</div>'
                ].join('');

              box = $(html);

              $('body').append(box);
            }

            $('.article-share-box.on').hide();

            box.css({
                top: offset.top + 25,
                left: offset.left
            }).addClass('on');

        }).on('click', '.article-share-box', function (e) {
            e.stopPropagation();
        }).on('click', '.article-share-box-input', function () {
            $(this).select();
        }).on('click', '.article-share-box-link', function (e) {
            e.preventDefault();
            e.stopPropagation();

            window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
        });
    })(jQuery);
</script>

            
    
        <a href="http://yoursite.com/2016/01/28/本地服务器搭建 二之 （服务器使用密钥安全连接/#comments" class="article-comment-link ds-thread-count" data-thread-key="http://yoursite.com/2016/01/28/本地服务器搭建 二之 （服务器使用密钥安全连接/">评论</a>
    

        </footer>
    </div>
    
</article>



    <article id="Layout-本地服务器搭建一之 （同网络下设备通信)" class="article article-type-Layout" itemscope itemprop="blogPost">
    <div class="article-inner">
        
        
            <header class="article-header">
                
    
        <h1 itemprop="name">
            <a class="article-title" href="/2016/01/27/本地服务器搭建一之 （同网络下设备通信)/">本地服务器搭建一之 （同网络下设备通信)</a>
        </h1>
    

                
                    <div class="article-meta">
                        
    <div class="article-date">
        <i class="fa fa-calendar"></i>
        <a href="/2016/01/27/本地服务器搭建一之 （同网络下设备通信)/">
            <time datetime="2016-01-26T16:00:00.000Z" itemprop="datePublished">2016-01-27</time>
        </a>
    </div>


                        
    <div class="article-category">
    	<i class="fa fa-folder"></i>
        <a class="article-category-link" href="/categories/服务器搭建/">服务器搭建</a>
    </div>

                        
    <div class="article-tag">
        <i class="fa fa-tag"></i>
        <a class="tag-link" href="/tags/服务器搭建/">服务器搭建</a>
    </div>

                    </div>
                
            </header>
        
        
        <div class="article-entry" itemprop="articleBody">
        
            
            <p>作者：<a href="https://lxchinesszz.github.io/" target="_blank" rel="external">@lxchinesszz</a><br>本文为作者原创，转载请注明出处</p>
<p>工作之余，本人一直想买一台服务器，介于价格，一忍再忍，无奈之下，萌生一个想法，通过自己的两台电脑，自己搭建一个服务器。 尤其之前用的ubuntu系统，用了三个多月，期间发现很多bug，所以准备换回centOS6，首先使用大白菜，把系统换位win10专业版，然后安装VMware10，在虚拟机里面安装CentOS6，因为两台PC设备和手机之间用的是同一个网络，所以可以互相连接。以下是我的操作步骤。</p>
<p>准备工作</p>
<ul>
<li>两台电脑，一部手机，同一个网络</li>
<li>pc使用命令行，手机在APP store 中下载Termius</li>
</ul>
<p>1.服务器创建用户</p>
<ul>
<li><p>首先创建一个组</p>
<pre><code>groupadd -g 1500 maclink //g参数就是组id 如果不加默认是1000 开始
</code></pre></li>
<li><p>添加一个用户</p>
<pre><code>useradd macuser -g maclink //添加一个用户名为macuser的用户在macgroup组中
</code></pre></li>
<li>如果你忘记你创建的组，那么使用下面的命令查看所有的组<pre><code>cat /etc/group
</code></pre></li>
</ul>
<p>2.查看互相的ip</p>
<ul>
<li><p>mac系统和centOS中查看ip地址是</p>
<pre><code>ifconfig 
# 这里我的mac地址是 192.168.1.107
# centOS中地址是设置和主机共享同一个网段 使用桥接方式，不要使用NAT方式，否则不是在一个网段
# centOS 中ip是   192.168.1.109

# 本篇文章最重要的地方就是这里，虚拟机中的服务器必须要和将要连接的电脑共处一个网段
# 所以必须使用桥接。
</code></pre></li>
<li><p>window系统中命令</p>
<pre><code>ipconfig
#windows下ip地址是 192.168.1.104
</code></pre></li>
<li>互相ping查看一下是否可以互相访问到<pre><code>Last login: Sun Feb 19 13:46:15 on ttys000
 mac@MacBook-Air ~ ping 192.168.1.109
PING 192.168.1.109 (192.168.1.109): 56 data bytes
64 bytes from 192.168.1.109: icmp_seq=0 ttl=64 time=139.139 ms
64 bytes from 192.168.1.109: icmp_seq=1 ttl=64 time=14.407 ms
64 bytes from 192.168.1.109: icmp_seq=2 ttl=64 time=173.413 ms
64 bytes from 192.168.1.109: icmp_seq=3 ttl=64 time=205.352 ms
# 如果看到这里，那么已经成功一大半了
</code></pre></li>
</ul>
<p>3.centOS中开方端口</p>
<ul>
<li>ssl mac@192.168.1.109  //默认使用的22端口 ，因为没有使用安全连接，他会让你选择yes和no<pre><code> ✘  mac@MacBook-Air ~ ssh mac@192.168.1.109
The authenticity of host &apos;192.168.1.109 (192.168.1.109)&apos; can&apos;t be established.
RSA key fingerprint is SHA256:8GcRL3cDzo3UHBCOTq5ExwKJ37VfTwJLBxZU0xWHBPY.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added &apos;192.168.1.109&apos; (RSA) to the list of known hosts.
mac@192.168.1.109&apos;s password:
[mac@localhost ~]$ ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos
[mac@localhost ~]$ ls
</code></pre></li>
</ul>
<p>这篇的内容就是这样，下一篇，《搭建服务器安全连接》</p>
<p>主要内容：</p>
<ul>
<li>服务器生成安全密钥</li>
<li>服务器开放一个供访问的安全端口</li>
<li>使用ssl 公钥 安全连接</li>
<li>最后终级目标是将局域网地址映射到公网</li>
</ul>

        
        </div>
        <footer class="article-footer">
            <div class="share-container">



</div>

    <a data-url="http://yoursite.com/2016/01/27/本地服务器搭建一之 （同网络下设备通信)/" data-id="cizk115gb001rjj8zahq4y288" class="article-share-link"><i class="fa fa-share"></i>分享到</a>
<script>
    (function ($) {
        // Prevent duplicate binding
        if (typeof(__SHARE_BUTTON_BINDED__) === 'undefined' || !__SHARE_BUTTON_BINDED__) {
            __SHARE_BUTTON_BINDED__ = true;
        } else {
            return;
        }
        $('body').on('click', function() {
            $('.article-share-box.on').removeClass('on');
        }).on('click', '.article-share-link', function(e) {
            e.stopPropagation();

            var $this = $(this),
                url = $this.attr('data-url'),
                encodedUrl = encodeURIComponent(url),
                id = 'article-share-box-' + $this.attr('data-id'),
                offset = $this.offset(),
                box;

            if ($('#' + id).length) {
                box = $('#' + id);

                if (box.hasClass('on')){
                    box.removeClass('on');
                    return;
                }
            } else {
                var html = [
                    '<div id="' + id + '" class="article-share-box">',
                        '<input class="article-share-input" value="' + url + '">',
                        '<div class="article-share-links">',
                            '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="fa fa-twitter article-share-twitter" target="_blank" title="Twitter"></a>',
                            '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="fa fa-facebook article-share-facebook" target="_blank" title="Facebook"></a>',
                            '<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="fa fa-pinterest article-share-pinterest" target="_blank" title="Pinterest"></a>',
                            '<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="fa fa-google article-share-google" target="_blank" title="Google+"></a>',
                        '</div>',
                    '</div>'
                ].join('');

              box = $(html);

              $('body').append(box);
            }

            $('.article-share-box.on').hide();

            box.css({
                top: offset.top + 25,
                left: offset.left
            }).addClass('on');

        }).on('click', '.article-share-box', function (e) {
            e.stopPropagation();
        }).on('click', '.article-share-box-input', function () {
            $(this).select();
        }).on('click', '.article-share-box-link', function (e) {
            e.preventDefault();
            e.stopPropagation();

            window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
        });
    })(jQuery);
</script>

            
    
        <a href="http://yoursite.com/2016/01/27/本地服务器搭建一之 （同网络下设备通信)/#comments" class="article-comment-link ds-thread-count" data-thread-key="http://yoursite.com/2016/01/27/本地服务器搭建一之 （同网络下设备通信)/">评论</a>
    

        </footer>
    </div>
    
</article>



    <article id="Layout-SpringBoot配置多套环境" class="article article-type-Layout" itemscope itemprop="blogPost">
    <div class="article-inner">
        
        
            <header class="article-header">
                
    
        <h1 itemprop="name">
            <a class="article-title" href="/2016/01/21/SpringBoot配置多套环境/">SpringBoot配置多套环境</a>
        </h1>
    

                
                    <div class="article-meta">
                        
    <div class="article-date">
        <i class="fa fa-calendar"></i>
        <a href="/2016/01/21/SpringBoot配置多套环境/">
            <time datetime="2016-01-20T16:00:00.000Z" itemprop="datePublished">2016-01-21</time>
        </a>
    </div>


                        
    <div class="article-category">
    	<i class="fa fa-folder"></i>
        <a class="article-category-link" href="/categories/Spring-Boot实战/">Spring Boot实战</a>
    </div>

                        
    <div class="article-tag">
        <i class="fa fa-tag"></i>
        <a class="tag-link" href="/tags/启动环境/">启动环境</a>
    </div>

                    </div>
                
            </header>
        
        
        <div class="article-entry" itemprop="articleBody">
        
            
            <blockquote>
<p>生产中会经历，开发，测试，到上线。三个阶段</p>
</blockquote>
<pre><code>这个三个阶段，都有各自的配置文件，如果只是一个配置文件来回改
会很容易出现错误的，那么springboot提供了很简答的解决办法
</code></pre><p>使用spring.profiles.active=test</p>
<ul>
<li><p>定义一个application.properties 里面写上</p>
<ul>
<li>spring.profiles.active=test 默认启动test文件</li>
</ul>
</li>
<li><p>定义application-dev.properties</p>
</li>
<li>定义application-test.properties</li>
<li>定义application-prod.properties</li>
</ul>
<blockquote>
<p>使用java -jar mm.jar –spring.profiles.active=dev 运行启动dev环境</p>
<p>可以看到启动的是dev<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">2017-01-04 18:54:11.095  INFO 43026 --- [  restartedMain] dragonfly.DragonflyApplication           : Starting DragonflyApplication on KK-MINI.local with PID 43026 (/Users/liuxin/git/oto_saas_mybosc_pay/target/classes started by liuxin in /Users/liuxin/git/oto_saas_mybosc_pay)</div><div class="line">2017-01-04 18:54:11.100  INFO 43026 --- [  restartedMain] dragonfly.DragonflyApplication           : The following profiles are active: dev</div></pre></td></tr></table></figure></p>
</blockquote>

        
        </div>
        <footer class="article-footer">
            <div class="share-container">



</div>

    <a data-url="http://yoursite.com/2016/01/21/SpringBoot配置多套环境/" data-id="cizk115ed001djj8zdsx43rpz" class="article-share-link"><i class="fa fa-share"></i>分享到</a>
<script>
    (function ($) {
        // Prevent duplicate binding
        if (typeof(__SHARE_BUTTON_BINDED__) === 'undefined' || !__SHARE_BUTTON_BINDED__) {
            __SHARE_BUTTON_BINDED__ = true;
        } else {
            return;
        }
        $('body').on('click', function() {
            $('.article-share-box.on').removeClass('on');
        }).on('click', '.article-share-link', function(e) {
            e.stopPropagation();

            var $this = $(this),
                url = $this.attr('data-url'),
                encodedUrl = encodeURIComponent(url),
                id = 'article-share-box-' + $this.attr('data-id'),
                offset = $this.offset(),
                box;

            if ($('#' + id).length) {
                box = $('#' + id);

                if (box.hasClass('on')){
                    box.removeClass('on');
                    return;
                }
            } else {
                var html = [
                    '<div id="' + id + '" class="article-share-box">',
                        '<input class="article-share-input" value="' + url + '">',
                        '<div class="article-share-links">',
                            '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="fa fa-twitter article-share-twitter" target="_blank" title="Twitter"></a>',
                            '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="fa fa-facebook article-share-facebook" target="_blank" title="Facebook"></a>',
                            '<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="fa fa-pinterest article-share-pinterest" target="_blank" title="Pinterest"></a>',
                            '<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="fa fa-google article-share-google" target="_blank" title="Google+"></a>',
                        '</div>',
                    '</div>'
                ].join('');

              box = $(html);

              $('body').append(box);
            }

            $('.article-share-box.on').hide();

            box.css({
                top: offset.top + 25,
                left: offset.left
            }).addClass('on');

        }).on('click', '.article-share-box', function (e) {
            e.stopPropagation();
        }).on('click', '.article-share-box-input', function () {
            $(this).select();
        }).on('click', '.article-share-box-link', function (e) {
            e.preventDefault();
            e.stopPropagation();

            window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
        });
    })(jQuery);
</script>

            
    
        <a href="http://yoursite.com/2016/01/21/SpringBoot配置多套环境/#comments" class="article-comment-link ds-thread-count" data-thread-key="http://yoursite.com/2016/01/21/SpringBoot配置多套环境/">评论</a>
    

        </footer>
    </div>
    
</article>



    <article id="Layout-Java命名规范" class="article article-type-Layout" itemscope itemprop="blogPost">
    <div class="article-inner">
        
        
            <header class="article-header">
                
    
        <h1 itemprop="name">
            <a class="article-title" href="/2015/01/20/Java命名规范/">Java命名规范</a>
        </h1>
    

                
                    <div class="article-meta">
                        
    <div class="article-date">
        <i class="fa fa-calendar"></i>
        <a href="/2015/01/20/Java命名规范/">
            <time datetime="2015-01-19T16:00:00.000Z" itemprop="datePublished">2015-01-20</time>
        </a>
    </div>


                        
    <div class="article-category">
    	<i class="fa fa-folder"></i>
        <a class="article-category-link" href="/categories/Java命名规范/">Java命名规范</a>
    </div>

                        
    <div class="article-tag">
        <i class="fa fa-tag"></i>
        <a class="tag-link" href="/tags/Java命名规范/">Java命名规范</a>
    </div>

                    </div>
                
            </header>
        
        
        <div class="article-entry" itemprop="articleBody">
        
            
            <blockquote>
<p>数据对象分多种，为方便阅读并区分各数据对象的用途，习惯将数据对象分为以下几类，供参考： </p>
</blockquote>
<ul>
<li>1.持久对象 PO(persistant object)<br>对象关系映射(ORM)概念的产物，基本上对象的成员变量对应了数据库中一行记录各字段的映射，方便实现ORM的持久层框架如(Ibatis)在读取数据的时候将数据库一行记录快速转换为对象供业务层使用。因此，持久对象PO里边本应该不包含逻辑，只有标配的getter和setter方法即可。</li>
<li>2.数据对象DO(data object) 或 值对象VO(value object)<br>通常用于业务层之间的数据传递，和PO一样也是仅仅包含数据而已。但PO对象中成员变量严格与数据库一行记录的字段严格一一映射，但DO或者VO可以不是这样的，只要业务层对象之前交换需要的数据字段即可，因此承载的数据而言 DO &lt;= PO。</li>
<li>3.数据传输对象DTO/TO (data transfer object)<br>一般用于不同应用程序之间传输的数据对象，同个应用程序内部一般用DO即可。</li>
<li>4.业务对象BO (business object)<br>封装业务逻辑结果的业务对象可以包含多个类型的DO/VO或者PO等，一般封装好的BO可以包含各个维度的结果数据直接给Control层直接使用，一般体积会叫DO或PO大。</li>
<li>5.简单无规则java对象POJO(plain ordinary java object)<br>纯传统意义的java对象，只有属性字段及setter和getter方法，其中DO、PO一般可以称为POJO。实际项目中，一般不会有命名POJO的习惯。</li>
<li>6.数据访问对象DAO(data access object)<br>负责持久层的操作，并为业务层提供接口，一般配合PO针对数据库的CURD操作使用。</li>
</ul>
<p>以上对象命名纯属个人比较认可的对象命名习惯，一般还要结合团队的命名规范和项目的分层决定，命名规范区分开来只为开发减少沟通成本，如果没有必要，一切从简即可！</p>
<h2 id="附件"><a href="#附件" class="headerlink" title="附件"></a>附件</h2><blockquote>
<p>本文翻译自博客园   <a href="http://www.cnblogs.com/liuriqi/p/4028041.html" target="_blank" rel="external">link</a></p>
<p>阿里巴巴 Java 开发手册<a href="https://img.hacpai.com/file/2017/1/eb0998bac7664496b2f1af98e07b08e5-Java.pdf" target="_blank" rel="external">link</a></p>
</blockquote>

        
        </div>
        <footer class="article-footer">
            <div class="share-container">



</div>

    <a data-url="http://yoursite.com/2015/01/20/Java命名规范/" data-id="cizk115b40001jj8zk4xu9bxs" class="article-share-link"><i class="fa fa-share"></i>分享到</a>
<script>
    (function ($) {
        // Prevent duplicate binding
        if (typeof(__SHARE_BUTTON_BINDED__) === 'undefined' || !__SHARE_BUTTON_BINDED__) {
            __SHARE_BUTTON_BINDED__ = true;
        } else {
            return;
        }
        $('body').on('click', function() {
            $('.article-share-box.on').removeClass('on');
        }).on('click', '.article-share-link', function(e) {
            e.stopPropagation();

            var $this = $(this),
                url = $this.attr('data-url'),
                encodedUrl = encodeURIComponent(url),
                id = 'article-share-box-' + $this.attr('data-id'),
                offset = $this.offset(),
                box;

            if ($('#' + id).length) {
                box = $('#' + id);

                if (box.hasClass('on')){
                    box.removeClass('on');
                    return;
                }
            } else {
                var html = [
                    '<div id="' + id + '" class="article-share-box">',
                        '<input class="article-share-input" value="' + url + '">',
                        '<div class="article-share-links">',
                            '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="fa fa-twitter article-share-twitter" target="_blank" title="Twitter"></a>',
                            '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="fa fa-facebook article-share-facebook" target="_blank" title="Facebook"></a>',
                            '<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="fa fa-pinterest article-share-pinterest" target="_blank" title="Pinterest"></a>',
                            '<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="fa fa-google article-share-google" target="_blank" title="Google+"></a>',
                        '</div>',
                    '</div>'
                ].join('');

              box = $(html);

              $('body').append(box);
            }

            $('.article-share-box.on').hide();

            box.css({
                top: offset.top + 25,
                left: offset.left
            }).addClass('on');

        }).on('click', '.article-share-box', function (e) {
            e.stopPropagation();
        }).on('click', '.article-share-box-input', function () {
            $(this).select();
        }).on('click', '.article-share-box-link', function (e) {
            e.preventDefault();
            e.stopPropagation();

            window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
        });
    })(jQuery);
</script>

            
    
        <a href="http://yoursite.com/2015/01/20/Java命名规范/#comments" class="article-comment-link ds-thread-count" data-thread-key="http://yoursite.com/2015/01/20/Java命名规范/">评论</a>
    

        </footer>
    </div>
    
</article>



    <nav id="page-nav">
        <a class="extend prev" rel="prev" href="/page/2/">&laquo; 上一页</a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/">2</a><span class="page-number current">3</span>
    </nav>
</section>
            
                <aside id="sidebar">
   
        
    <div class="widget-wrap">
        <h3 class="widget-title">最新文章</h3>
        <div class="widget">
            <ul id="recent-post" class="">
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/2017/05/17/CPU-bound(计算密集型) 和IO bound(IO密集型)、进程vs线程/" class="thumbnail">
    
    
        <span class="thumbnail-image thumbnail-none"></span>
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/categories/服务器/">服务器</a></p>
                            <p class="item-title"><a href="/2017/05/17/CPU-bound(计算密集型) 和IO bound(IO密集型)、进程vs线程/" class="title">CPU-bound(计算密集型) 和IO bound(IO密集型)、进程vs线程</a></p>
                            <p class="item-date"><time datetime="2017-05-16T16:00:00.000Z" itemprop="datePublished">2017-05-17</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/2017/04/27/Spring Boot中使用@Async实现异步调用/" class="thumbnail">
    
    
        <span class="thumbnail-image thumbnail-none"></span>
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/categories/Spring-Boot实战/">Spring Boot实战</a></p>
                            <p class="item-title"><a href="/2017/04/27/Spring Boot中使用@Async实现异步调用/" class="title">Spring Boot中使用@Async实现异步调用</a></p>
                            <p class="item-date"><time datetime="2017-04-26T16:00:00.000Z" itemprop="datePublished">2017-04-27</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/2017/01/28/线程数究竟设多少合理/" class="thumbnail">
    
    
        <span class="thumbnail-image thumbnail-none"></span>
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/categories/服务器/">服务器</a></p>
                            <p class="item-title"><a href="/2017/01/28/线程数究竟设多少合理/" class="title">线程数究竟设多少合理</a></p>
                            <p class="item-date"><time datetime="2017-01-27T16:00:00.000Z" itemprop="datePublished">2017-01-28</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/2017/01/27/浅谈分布式与集群(未完待续)/" class="thumbnail">
    
    
        <span class="thumbnail-image thumbnail-none"></span>
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/categories/系统架构/">系统架构</a></p>
                            <p class="item-title"><a href="/2017/01/27/浅谈分布式与集群(未完待续)/" class="title">浅谈分布式与集群(未完待续)</a></p>
                            <p class="item-date"><time datetime="2017-01-26T16:00:00.000Z" itemprop="datePublished">2017-01-27</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/2017/01/11/Spring Cloud系列五 之 服务网关/" class="thumbnail">
    
    
        <span class="thumbnail-image thumbnail-none"></span>
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/categories/Spring-Cloud/">Spring Cloud</a></p>
                            <p class="item-title"><a href="/2017/01/11/Spring Cloud系列五 之 服务网关/" class="title">Spring Cloud系列五 之 服务网关</a></p>
                            <p class="item-date"><time datetime="2017-01-10T16:00:00.000Z" itemprop="datePublished">2017-01-11</time></p>
                        </div>
                    </li>
                
            </ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">分类</h3>
        <div class="widget">
            <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Java命名规范/">Java命名规范</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Spring-Boot实战/">Spring Boot实战</a><span class="category-list-count">13</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Spring-Cloud/">Spring Cloud</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/服务器/">服务器</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/服务器搭建/">服务器搭建</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/系统架构/">系统架构</a><span class="category-list-count">1</span></li></ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">归档</h3>
        <div class="widget">
            <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/">五月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/04/">四月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/01/">一月 2017</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/12/">十二月 2016</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/11/">十一月 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/10/">十月 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/08/">八月 2016</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/07/">七月 2016</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/06/">六月 2016</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/05/">五月 2016</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">一月 2016</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/01/">一月 2015</a><span class="archive-list-count">1</span></li></ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">标签</h3>
        <div class="widget">
            <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Java命名规范/">Java命名规范</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Maven/">Maven</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Spring-Boot中使用-Async实现异步调用/">Spring Boot中使用@Async实现异步调用</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Spring-Boot注解/">Spring Boot注解</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Spring-Cloud/">Spring Cloud</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/SpringBoot原生定时任务解析/">SpringBoot原生定时任务解析</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/SpringBoot在启动类配置端口号/">SpringBoot在启动类配置端口号</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/SpringBoot拦截器/">SpringBoot拦截器</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/SpringBoot配置视图/">SpringBoot配置视图</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Spring整合Quartz2-1-1/">Spring整合Quartz2.1.1</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/优化方案/">优化方案</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/分布式与集群/">分布式与集群</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/动态读取任务执行/">动态读取任务执行</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/启动环境/">启动环境</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/整合定时任务/">整合定时任务</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/服务器/">服务器</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/服务器搭建/">服务器搭建</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/计算/">计算</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/配置文件加载/">配置文件加载</a><span class="tag-list-count">1</span></li></ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">标签云</h3>
        <div class="widget tagcloud">
            <a href="/tags/Java命名规范/" style="font-size: 10px;">Java命名规范</a> <a href="/tags/Maven/" style="font-size: 10px;">Maven</a> <a href="/tags/Spring-Boot中使用-Async实现异步调用/" style="font-size: 10px;">Spring Boot中使用@Async实现异步调用</a> <a href="/tags/Spring-Boot注解/" style="font-size: 10px;">Spring Boot注解</a> <a href="/tags/Spring-Cloud/" style="font-size: 20px;">Spring Cloud</a> <a href="/tags/SpringBoot原生定时任务解析/" style="font-size: 10px;">SpringBoot原生定时任务解析</a> <a href="/tags/SpringBoot在启动类配置端口号/" style="font-size: 10px;">SpringBoot在启动类配置端口号</a> <a href="/tags/SpringBoot拦截器/" style="font-size: 10px;">SpringBoot拦截器</a> <a href="/tags/SpringBoot配置视图/" style="font-size: 10px;">SpringBoot配置视图</a> <a href="/tags/Spring整合Quartz2-1-1/" style="font-size: 10px;">Spring整合Quartz2.1.1</a> <a href="/tags/优化方案/" style="font-size: 10px;">优化方案</a> <a href="/tags/分布式与集群/" style="font-size: 10px;">分布式与集群</a> <a href="/tags/动态读取任务执行/" style="font-size: 10px;">动态读取任务执行</a> <a href="/tags/启动环境/" style="font-size: 10px;">启动环境</a> <a href="/tags/整合定时任务/" style="font-size: 10px;">整合定时任务</a> <a href="/tags/服务器/" style="font-size: 10px;">服务器</a> <a href="/tags/服务器搭建/" style="font-size: 15px;">服务器搭建</a> <a href="/tags/计算/" style="font-size: 10px;">计算</a> <a href="/tags/配置文件加载/" style="font-size: 10px;">配置文件加载</a>
        </div>
    </div>

    
        
    <div class="widget-wrap widget-list">
        <h3 class="widget-title">链接</h3>
        <div class="widget">
            <ul>
                
                    <li>
                        <a href="http://www.jianshu.com/u/e210c8fa704f">简书</a>
                    </li>
                
                    <li>
                        <a href="http://blog.csdn.net/message_lx/article/details/56674087">CSDN</a>
                    </li>
                
                    <li>
                        <a href="https://www.zhihu.com/people/chinesszz/activities">知乎</a>
                    </li>
                
                    <li>
                        <a href="https://my.oschina.net/chinesszz/blog">开源中国</a>
                    </li>
                
                    <li>
                        <a href="https://lxchinesszz.github.io/">GITHUB博客</a>
                    </li>
                
            </ul>
        </div>
    </div>


    
    <div id="toTop" class="fa fa-angle-up"></div>
</aside>
            
        </div>
        <footer id="footer">
    <div class="outer">
        <div id="footer-info" class="inner">
            &copy; 2017<br>
            <a href="http://www.jianshu.com/u/e210c8fa704f" target="_blank">简书</a>. by <a href="https://github.com/lxchinesszz">Liuxin</a>
        </div>
    </div>
</footer>
        
    
    <script type="text/javascript">
    var duoshuoQuery = {short_name:'lxchinesszz'};
    (function() {
    var ds = document.createElement('script');
    ds.type = 'text/javascript';ds.async = true;
    ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
    ds.charset = 'UTF-8';
    (document.getElementsByTagName('head')[0]
    || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
    </script>



    
        <script src="/libs/lightgallery/js/lightgallery.min.js"></script>
        <script src="/libs/lightgallery/js/lg-thumbnail.min.js"></script>
        <script src="/libs/lightgallery/js/lg-pager.min.js"></script>
        <script src="/libs/lightgallery/js/lg-autoplay.min.js"></script>
        <script src="/libs/lightgallery/js/lg-fullscreen.min.js"></script>
        <script src="/libs/lightgallery/js/lg-zoom.min.js"></script>
        <script src="/libs/lightgallery/js/lg-hash.min.js"></script>
        <script src="/libs/lightgallery/js/lg-share.min.js"></script>
        <script src="/libs/lightgallery/js/lg-video.min.js"></script>
    
    
        <script src="/libs/justified-gallery/jquery.justifiedGallery.min.js"></script>
    



<!-- Custom Scripts -->
<script src="/js/main.js"></script>

    </div>
</body>
</html>